<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>节点操作</title>
	<style type="text/css">
		.box{
			width: 200px;
			height: 600px;
			background: red url() 0 0 no-repeat;
		}
		.son{
			width: 100px;
			height: 100px;
			background: blue url() 0 0 no-repeat;
		}
	</style>
	<script type="text/javascript">
		window.onload = function  () {
			var box = document.getElementById('box');
			var button = document.getElementById('button');

			// var nodeP = document.createElement('p');

			// nodeP.innerHTML = "这个可以有";

			// nodeP.style.backgroundColor='blue';

			// box.appendChild(nodeP);

			button.onclick = function  () {
				var son = document.getElementById('son');

				var sonCopy = son.cloneNode();

				box.appendChild(sonCopy);
			}


			
		}
	</script>
</head>
<body>
	<input type="button" value="点我可以挪动" id="button">
	<!-- 这个是注释 -->
	<div class="box"  id="box">
		
	</div>
	<div class="son" id="son">
		
	</div>
</body>
</html>